package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 4/3/15
 * Time: 15:25
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class AuthorFeed implements Parcelable {
    private int id = 0;
    private String name = "";
    private String avatar = "";
    private String description = "";

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.name);
        dest.writeString(this.avatar);
        dest.writeString(this.description);
    }

    public AuthorFeed() {
    }

    private AuthorFeed(Parcel in) {
        this.id = in.readInt();
        this.name = in.readString();
        this.avatar = in.readString();
        this.description = in.readString();
    }

    public static final Creator<AuthorFeed> CREATOR = new Creator<AuthorFeed>() {
        public AuthorFeed createFromParcel(Parcel source) {
            return new AuthorFeed(source);
        }

        public AuthorFeed[] newArray(int size) {
            return new AuthorFeed[size];
        }
    };

    @Override
    public String toString() {
        return "AuthorFeed{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", avartar='" + avatar + '\'' +
                ", description='" + description + '\'' +
                '}';
    }
}
